<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<head>
  <meta charset="UTF-8">
  <title>订单与用户信息管理系统</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport"
    content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
  <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
  <link rel="stylesheet" href="/css/font.css">
  <link rel="stylesheet" href="/css/xadmin.css">
  <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
  <script type="text/javascript" th:src="@{/js/jquery.1.10.min.js}"></script>
  <script th:src="@{/lib/layui/layui.js}" charset="utf-8"></script>
  <script type="text/javascript" th:src="@{/js/xadmin.js}"></script>
  <script type="text/javascript" th:src="@{/js/jquery.1.10.min.js}"></script>
</head>

<body>


<!--头部-->
  <div class="x-nav">
    <span class="layui-breadcrumb">
      <a href="./welcome">首页</a>
      <a>
        <cite>会员管理</cite></a>
    </span>
  </div>






<!-------------------------------------------增加信息------------------------------------------------------>
<div class="modal" id="add">
  <div class="add_box">
  <form class="layui-form" action="/stu/member-save" method="post">

    <div class="layui-form-item">
      <label  class="layui-form-label">
        <span class="x-red">*</span>邮箱
      </label>
      <div class="layui-input-inline">
        <input type="text"  name="mail"  class="layui-input">
      </div>
      <div class="layui-form-mid layui-word-aux">
        <span class="x-red">*</span>将会成为您唯一的登入名
      </div>
    </div>
    <div class="layui-form-item">
      <label  class="layui-form-label">
        <span class="x-red">*</span>用户名
      </label>
      <div class="layui-input-inline">
        <input type="text" name="name" class="layui-input">
      </div>
    </div>

    <div class="layui-form-item">
      <label  class="layui-form-label">
        <span class="x-red">*</span>年龄
      </label>
      <div class="layui-input-inline">
        <input type="text" name="age" class="layui-input">
      </div>
    </div>

    <div class="layui-form-item">
      <label  class="layui-form-label">
        <span class="x-red">*</span>性别
      </label>
      <div class="layui-input-inline">
        <input type="text" name="sex" class="layui-input">
      </div>
    </div>

    <div class="layui-form-item">
      <label  class="layui-form-label">
        <span class="x-red">*</span>地址
      </label>
      <div class="layui-input-inline">
        <input type="text"  name="address" class="layui-input">
      </div>
    </div>

    <div class="layui-form-item">
      <label  class="layui-form-label">
        <span class="x-red">*</span>手机号
      </label>
      <div class="layui-input-inline">
        <input type="text" name="phone" class="layui-input">
      </div>
    </div>

    <div class="layui-form-item">
      <label  class="layui-form-label">
      </label>
      <button  class="layui-btn" lay-filter="add" lay-submit="">
        增加
      </button>
      <a class="layui-btn " href="javascript:location.replace(location.href);">
        返回
      </a>
    </div>
  </form>
  </div>
</div>






<!-------------------------------------------------------查询列表----------------------------------------------------->
  <div class="x-body" >
    <xblock id="xbox">
      <button class="layui-btn add" onclick="add()"><i class="layui-icon"></i>添加</button>
      <span class="x-right" style="line-height:40px">共有数据：<span th:text="${membersize}"></span> 条</span>
    </xblock>
    <table class="layui-table">
      <thead>
        <tr>
          <th>邮箱</th>
          <th>用户名</th>
          <th>年龄</th>
          <th>性别</th>
          <th>手机</th>
          <th>地址</th>
          <th>加入时间</th>
          <th>操作</th>
        </tr>
      </thead>
      <tbody>
        <tr th:each="member :${memberlist}">
          <td>[[${member.mail}]]</td>
          <td>[[${member.name}]]</td>
          <td>[[${member.age}]]</td>
          <td>[[${member.sex}]]</td>
          <td>[[${member.phone}]]</td>
          <td>[[${member.address}]]</td>
          <td>[[${member.creatTime}]]</td>
          <td class="td-manage">
            <a title="编辑" th:href="'/stu/member-update/'+${member.mail}+'/'+${member.name}+'/'+${member.age}+'/'+${member.sex}+'/'+${member.phone}+'/'+${member.address}" href="javascript:;">
              <i class="layui-icon">&#xe642;</i>
            </a>
            <a title="删除" th:href="'/stu/member-delect/'+${member.mail}" >
              <i class="layui-icon">&#xe640;</i>
            </a>
          </td>
        </tr>
      </tbody>
    </table>
  </div>




  <script th:inline="javascript">
<!--增加-->
    function add(){
      $("#add").show();
    }

<!--修改-->
function edit(){
  $("#edit").show();
  $("#xbox").hide();
}
  </script>
</body>

</html>